createDisk
Description
Create a disk.
Request Method
POST
Request Path
/customer/disk/create
Request Parameters Common Parameters
Name | Location | Type | Required | Sample value | Description |
---|---|---|---|---|---|
USER_CODE_KEY | Head | String | No | No sample value for this parameter. | 不经过gateway,直接调用customer需要提供user_code头 |
period | BODY | integer | Yes | No sample value for this parameter. | time of purchase |
cost | BODY | number | Yes | No sample value for this parameter. | cost |
useSnapshot | BODY | boolean | Yes | No sample value for this parameter. | whether to use snapshots |
regionId | BODY | string | Yes | No sample value for this parameter. | region id |
billingMethod | BODY | string | Yes | No sample value for this parameter. | method of billing |
zoneId | BODY | string | Yes | No sample value for this parameter. | when purchase pay as you go need to pass it |
pricingCycle | BODY | string | Yes | No sample value for this parameter. | billing cycle |
diskType | BODY | string | Yes | No sample value for this parameter. | type of disk |
autoRenewalFlag | BODY | boolean | Yes | No sample value for this parameter. | flag of automatic renewal function |
snapshot | BODY | string | Yes | No sample value for this parameter. | snapshot id |
capacity | BODY | integer | Yes | No sample value for this parameter. | capacity of disk |
Return data
Name | Type | Sample value | Description |
---|---|---|---|
result | object | `{"instanceId":"d-nldsafhl23032","orderId":12894273598274}` | No description for this parameter. |
resultCode | string | 0 | No description for this parameter. |
resultMsg | string | success | No description for this parameter. |
Example
Successful Response example
{
"result":
{
"instanceId":"d-nldsafhl23032",
"orderId":12894273598274
},
"resultCode":"0",
"resultMsg":"success"
}
Failed Response example
{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}
}